package binarytree;


/**
 * 测试用例
 *
 * @author by Assume
 * @date 2018/8/1 10:14
 */
public class main {
    public static void main(String[] args) {
        BST bst = new BST();
//        for (int i = 0; i < 100; i++) {
//            int r = new Random().nextInt(100);
//            bst.add(r);
//        }
        int[] arr = {28, 16, 13, 22, 30, 29, 42};
        for (int i = 0; i < arr.length; i++) {
            bst.add(arr[i]);
        }
//        bst.preOrder();
        bst.postOrder();
        // System.out.print(bst);
        System.out.println("该树的大小为：" + bst.getSize());
//        bst.preOrderByStack();
        System.out.println(bst.postOrderByStack());
        bst.removeMin();
        System.out.println(bst.sequenceOrder());
    }
}
